import '@/styles/index.scss'
import 'uno.css'

import { createApp } from 'vue'
import { setupRouter } from '@/router'
import { setupStore } from '@/store'
import { setupI18n } from '@/lang/index.js'
//小项目使用此方法代替状态管理器
// import { setupAppProvide } from '@/provide/index.js'
import { setAppConfig } from '@/app-config/index.js'
import { setupDirectives } from '@/directives/index.js'
import { setupVxeTable } from '@/plugin/vxe-table/index.js'
import '@/styles/vxe-var.scss'
import App from './App.vue'

function setupApp() {
  const app = createApp(App)
  /*
   * 注意事项
   * setupStore 与 setupAppProvide 要放在顶部
   * 同时存在时 setupStore 优先
   * */
  setupStore(app)
  // setupAppProvide(app)
  setupRouter(app)
  setupDirectives(app)
  setAppConfig(app)
  setupVxeTable(app)
  setupI18n(app)
  app.mount('#app')
}

setupApp()
